<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <input type="text" v-model="xyjNum"> <br/>
        西游记价格:{{xyjPrice}}
        <input type="text" v-model="shzNum"> <br/>
        水浒传价格:{{shzPrice}}
        总价格:{{totalPrice}}
    </div>
    <script src="./node_modules/vue/dist/vue.js"></script>
    <script>
        new Vue({
            el:"#app",
            data:{
                xyjPrice:98.00,
                shzPrice:58.00,
                xyjNum:1,
                shzNum:1
            },
            computed:{
                totalPrice(){
                    return this.xyjNum*this.xyjPrice+this.shzNum*this.shzPrice;
                }
            },
            watch:{
                xyjNum:function(newVal,oldVal){
                    alert(newVal+"===>"+oldVal)
                }
            },
            filters:{
                gFilter(){
                    // 过滤逻辑
                }
            }
        })
    </script>
</body>
</html>